import request from '../request'

// 教师管理相关API
export const teacherApi = {
  // 获取教师列表
  getTeacherList(params) {
    return request({
      url: '/teachers',
      method: 'get',
      params
    })
  },
  
  // 获取教师详情
  getTeacherDetail(id) {
    return request({
      url: `/teachers/${id}`,
      method: 'get'
    })
  },
  
  // 添加教师
  addTeacher(data) {
    return request({
      url: '/teachers',
      method: 'post',
      data
    })
  },
  
  // 更新教师信息
  updateTeacher(id, data) {
    return request({
      url: `/teachers/${id}`,
      method: 'put',
      data
    })
  },
  
  // 删除教师
  deleteTeacher(id) {
    return request({
      url: `/teachers/${id}`,
      method: 'delete'
    })
  }
}